package com.journey.org.ui.home.beauty

import android.app.Application
import androidx.databinding.ObservableBoolean
import androidx.databinding.ObservableField
import com.mvvmhabit.org.base.BaseViewModel
import com.mvvmhabit.org.binding.command.BindingAction
import com.mvvmhabit.org.binding.command.BindingCommand
import com.mvvmhabit.org.binding.command.BindingConsumer

/**
 * @Date: 2020/11/24 11:05
 * @Author:小妖
 * @Description: 美女
 */
class BeautyGirlViewModel(application: Application) : BaseViewModel(application) {

    val onSearchField = ObservableField<String>("")

    val isClearVisibleField = ObservableBoolean(false)

    val onFinishCommand = BindingCommand<Any>(object : BindingAction {
        override fun call() {
            finish()
        }
    })

    val onClearSearchCommand = BindingCommand<Any>(object : BindingAction {
        override fun call() {
            onSearchField.set("")
        }
    })

    val onSearchCommand = BindingCommand<Any>(object : BindingAction {
        override fun call() {
            // loadBeautyGirlList()
        }
    })

    val onSearchFocusChangeCommand = BindingCommand(object : BindingConsumer<Boolean> {
        override fun call(t: Boolean) {

        }
    })
}